win32: Remove all checks for GDK_WINDOW_ROOT
authorMatthias Clasen <mclasen@redhat.com>
Tue, 14 Nov 2017 23:09:32 +0000 (18:09 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 14 Nov 2017 23:16:19 +0000 (18:16 -0500)
We are no longer creating windows of this type, so no
need to check for it.

gdk/win32/gdkdevice-win32.c
gdk/win32/gdkevents-win32.c
gdk/win32/gdkgeometry-win32.c
gdk/win32/gdkwindow-win32.c

index d0e965431866ab30f0e954ed8c548928acb1ad56..c8c02dde0df5d3732ddbe882966007d3fce6d19c 100644 (file)
@@ -223,7 +223,6 @@ _gdk_device_win32_window_at_position (GdkDevice       *device,
         window = gdk_win32_handle_table_lookup (hwnd);
 
         if (window != NULL &&
-            GDK_WINDOW_TYPE (window) != GDK_WINDOW_ROOT &&
             GDK_WINDOW_TYPE (window) != GDK_WINDOW_FOREIGN)
           break;
 
index 0df1805b4060a81ec3af8c5e66ac66b5f83d0347..720e74981bde76a8531a1838388d7ebe456abe99 100644 (file)
@@ -1161,14 +1161,14 @@ find_common_ancestor (GdkWindow *win1,
   GList *list1, *list2;
 
   tmp = win1;
-  while (tmp != NULL && tmp->window_type != GDK_WINDOW_ROOT)
+  while (tmp != NULL)
     {
       path1 = g_list_prepend (path1, tmp);
       tmp = get_native_parent (tmp);
     }
 
   tmp = win2;
-  while (tmp != NULL && tmp->window_type != GDK_WINDOW_ROOT)
+  while (tmp != NULL)
     {
       path2 = g_list_prepend (path2, tmp);
       tmp = get_native_parent (tmp);
@@ -1241,7 +1241,7 @@ synthesize_crossing_events (GdkDisplay                 *display,
 
          last = a;
          win = get_native_parent (a);
-         while (win != c && win->window_type != GDK_WINDOW_ROOT)
+         while (win != c && win != NULL)
            {
              send_crossing_event (display,
                                   win, GDK_LEAVE_NOTIFY,
@@ -1264,7 +1264,7 @@ synthesize_crossing_events (GdkDisplay                 *display,
        {
          path = NULL;
          win = get_native_parent (b);
-         while (win != c && win->window_type != GDK_WINDOW_ROOT)
+         while (win != c && win != NULL)
            {
              path = g_list_prepend (path, win);
              win = get_native_parent (win);
index 02d61ef436ce702b006cff994643ae3c7845ef61..d748523bacfd471d3c276aa5f969cc0960b38b88 100644 (file)
@@ -127,14 +127,11 @@ _gdk_win32_window_tmp_unset_bg (GdkWindow *window,
 {
   g_return_if_fail (GDK_IS_WINDOW (window));
 
-  if (window->input_only || window->destroyed ||
-      (window->window_type != GDK_WINDOW_ROOT &&
-       !GDK_WINDOW_IS_MAPPED (window)))
+  if (window->input_only || window->destroyed || !GDK_WINDOW_IS_MAPPED (window))
     return;
 
   if (_gdk_window_has_impl (window) &&
       GDK_WINDOW_IS_WIN32 (window) &&
-      window->window_type != GDK_WINDOW_ROOT &&
       window->window_type != GDK_WINDOW_FOREIGN)
     tmp_unset_bg (window);
 
@@ -150,7 +147,7 @@ _gdk_win32_window_tmp_unset_bg (GdkWindow *window,
 void
 _gdk_win32_window_tmp_unset_parent_bg (GdkWindow *window)
 {
-  if (GDK_WINDOW_TYPE (window->parent) == GDK_WINDOW_ROOT)
+  if (window->parent == NULL)
     return;
 
   window = _gdk_window_get_impl_window (window->parent);
@@ -163,13 +160,11 @@ _gdk_win32_window_tmp_reset_bg (GdkWindow *window,
 {
   g_return_if_fail (GDK_IS_WINDOW (window));
 
-  if (window->input_only || window->destroyed ||
-      (window->window_type != GDK_WINDOW_ROOT && !GDK_WINDOW_IS_MAPPED (window)))
+  if (window->input_only || window->destroyed || !GDK_WINDOW_IS_MAPPED (window))
     return;
 
   if (_gdk_window_has_impl (window) &&
       GDK_WINDOW_IS_WIN32 (window) &&
-      window->window_type != GDK_WINDOW_ROOT &&
       window->window_type != GDK_WINDOW_FOREIGN)
     {
       tmp_reset_bg (window);
index ae1f24311d5c93197f55444686d44005eba53ddf..9f62065ca57fcaea25c22c21fd7d52768237d425 100644 (file)
@@ -716,7 +716,7 @@ _gdk_win32_display_create_window_impl (GdkDisplay    *display,
   switch (window->window_type)
     {
     case GDK_WINDOW_TOPLEVEL:
-      if (window->parent && GDK_WINDOW_TYPE (window->parent) != GDK_WINDOW_ROOT)
+      if (window->parent)
        {
          /* The common code warns for this case. */
          hparent = GetDesktopWindow ();